export async function getOrder(orderObjectId) {
    var query_orderItem = new AV.Query('orderItem');
    var order = AV.Object.createWithoutData('order', orderObjectId);
    query_orderItem.equalTo('order', order);

    // 想在查询的同时获取关联对象的属性则一定要使用 `include` 接口用来指定返回的 `key`
    query_orderItem.include('order');
    query_orderItem.include('fabric');
    query_orderItem.include('design');
    var a = await  query_orderItem.find().then(res => {
        var b = res.map(item => item.toJSON())
        return b
    })

    //order
    var query = new AV.Query('order');
    var _order = await query.get(orderObjectId)
    return {orders: a, order: _order.toJSON()}
}